const pug = require('pug')
const fs = require('fs')

pug.renderFile('./views/pug1.pug', {pretty: true, name: 'victor'}, (err, data) => {
  if(err) console.log(err)
  else{
    fs.writeFile('./pug.html', data, (err) => {
      console.log('write success!!!')
    })
  }
})